<template>
  <div class="box">
    <div class="item">
      <div @click="toFilmDetail(film.filmId)" class="left">
        <img v-lazy="film.poster" />
      </div>
      <div class="center">
        <div class="nm">{{ film.name }}</div>
        <div class="en">{{ film.filmType.name }}</div>
        <div class="ty">{{ film.category }}</div>
        <div class="ac">主演：{{ film.actors | actorToStr }}</div>
        <div class="ti">2020-12-04中国大陆上映</div>
      </div>
      <div class="right">
        <div class="re">
          <span>{{ film.grade || 10 }}</span
          >分
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    film: Object,
  },
 
  mounted() {},
  methods: {
    toFilmDetail(id) {
      this.$router.push({
        name: "filmDetail",
        params: { id },
      });
    },
  },
};
</script>
<style lang='scss' scoped>
.box {
  .item {
    width: 100%;
    display: flex;
    margin-top: 10px;
    .left {
      width: 66px;
      height: 94px;
      margin: 10px 16px 6px;
      img {
        width: 70px;
        height: 100px;
      }
    }
    .center {
      margin: 10px -5px 0 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 200px;
      // background: fuchsia;
      .nm {
        font-size: 16px;
        font-weight: bold;
      }
      .en {
        font-size: 12px;
        color: rgb(82, 80, 80);
      }
      .ty {
        font-size: 12px;
        color: rgb(82, 80, 80);
      }
      .ac{
         font-size: 12px;
        color: rgb(82, 80, 80);
      }
      .ti {
        font-size: 12px;
        color: rgb(82, 80, 80);
      }
    }
    .right {
      margin: 10px 0 0 20px;
      .re {
        span {
          color: orange;
        }
      }
    }
  }
  &:last-child {
    padding-bottom: 55px;
  }
}
</style>
